<? startScript('jquery, jquery.tools'); ?><script type="text/javascript">
	jQuery(function($) { $("ul.jt-tabs").tabs("div.jt-panes > div"); });
</script><? endScript(); ?>

<form action="" method="post">

<fieldset><legend> <?=t('Breadcrumbs', 'cpn')?> </legend>

	<p><strong><?=t('Where to start from', 'cpn')?></strong>
		<select name="bc_mode"><?
			foreach(array(
					0 => t("Don't show breadcrumbs at all", 'cpn'), 
					1 => t('Show from the top level', 'cpn'), 
					2 => t('Show from the specified level', 'cpn')) as $k => $v) { 
				?><option value="<?=$k?>" <?=($DATA['settings']['bc_mode'] == $k) ? 'selected' : ''?> ><?=$v?></option><?
			}
		?></select>
	</p>
	
	<p class="bc_starting"><label><?=t('Starting level', 'cpn')?> 
		<input type="text" name="bc_starting" class="narrow" value="<?=hdat('settings', 'bc_starting')?>" /></label></p>

	<? startScript(); ?><script type="text/javascript">
		$('select[name="bc_mode"]').change(function(){
			if ($(this).find("option:selected").val() == 2)
				$(".bc_starting").show();
			else
				$(".bc_starting").hide();
		}).change();
	</script><? endScript(); ?>
	
	<p><label><?=t('Crumb separator', 'cpn')?> 
		<input type="text" name="bc_sep" class="narrow" value="<?=hdat('settings', 'bc_sep')?>" /></label></p>
	

</fieldset>


<fieldset><legend> <?=t('Navigation', 'cpn')?> </legend>

	<p><strong><?=t('Starting level', 'cpn')?>
		<select name="nav_mode"><?
			foreach(array(
					0 => t("Don't show navigation at all", 'cpn'), 
					1 => t('Show from the top level', 'cpn'), 
					2 => t('Show from the current level', 'cpn'), 
					3 => t('Show from the specified level', 'cpn')) as $k => $v) { 
				?><option value="<?=$k?>" <?=($DATA['settings']['nav_mode'] == $k) ? 'selected' : ''?> ><?=$v?></option><?
			}
		?></select>
	</p>
	
	<p class="nav_starting"><label> <?=t('Starting level', 'cpn')?> 
		<input type="text" name="nav_starting" class="narrow" value="<?=hdat('settings', 'nav_starting')?>" /></label></p>

	<p><label><?=t('Navigation deep', 'cpn')?> 
		<input type="text" name="nav_deep" class="narrow" value="<?=hdat('settings', 'nav_deep')?>" /></label></p>

	<? startScript(); ?><script type="text/javascript">
		$('select[name="nav_mode"]').change(function(){
			if ($(this).find("option:selected").val() == 3)
				$(".nav_starting").show();
			else
				$(".nav_starting").hide();
		}).change();
	</script><? endScript(); ?>

</fieldset>

<p><input type="submit" name="editor_save" value="<?=ht('Save', 'cpn')?>" /></p>

</form>
